package cn.yuhh.core.type;

/**
 * @author ysw
 * @create 2019-02-24 21:55
 * @description
 **/
public enum ResponseHeader {

    /**
     * 系统配置
     */
    SUCCESS(200, "success"),

    SUCCESS_302(302, "redirect"),

    BAD_REQUEST(400, "bad request"),

    NOT_SERVICE(404, "Service Not Found"),

    NOT_AUTHORIZED(406, "请登陆"),
    LOGIN_AUTHORIZED(408, "请登陆"),
    NOT_SUB(407, "未订阅"),

    INTERNAL_SERVER_ERROR(500, "Internal Server Error"),


    /**
     * 业务配置
     */
    CONFIRM_PASSWORD_ERROR(409, "确认密码错误"),
    NO_READ_RECORD(410,"无阅读记录"),
    CODE_ERROR(411,"短信验证码错误"),
    NO_BIND_PHONE(412,"请绑定手机号"),
    VERSION_ERROR(413,"app版本不匹配"),
    USER_NAME_HAS(420,"用户名已存在"),
    SensitiveWord(416,"违反敏感词");


    private final int code;

    private final String message;

    ResponseHeader(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
